#ifndef TIME_H
#define TIME_H

#include "cpu/irq.h"

#define PIT_OSC_FREQ            1193182         //晶体振荡器频率，PIT(program interrupt timer)
#define PIT_COMMAND_MODE_PORT   0x43            // 命令和模式端口
#define PIT_CHANNEL0_DATA_PORT  0x40            // 数据端口

#define PIT_CHANNEL0            (0 << 6)
#define PIT_LOAD_LOHI           (3 << 4)
#define PIT_MODE3               (3 << 1)
#define PIT_COUNTER_MODE        (0 << 0)

void time_init(void);
void exception_handler_time(exception_frame_t *frame);

#endif